import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import "amfe-flexible/index.js";

import {
  Button,
  Cell,
  Field,
  Icon,
  Image,
  Row,
  Col,
  Popup,
  Search,
  Uploader,
  PullRefresh,
  ImagePreview,
  Lazyload,
  Swipe,
  SwipeItem,
  NavBar,
  Tab,
  Tabs,
  Tabbar,
  TabbarItem,
  Tag,
  Switch,
  List,
  Toast,
  Dialog,
  Picker,
  Overlay,
  TreeSelect,
  NoticeBar,
  Sticky,
  Grid,
  GridItem
} from "vant";
Vue.use(Button);
Vue.use(Cell);
Vue.use(Field);
Vue.use(Icon);
Vue.use(Image);
Vue.use(Row);
Vue.use(Col);
Vue.use(Popup);
Vue.use(Search);
Vue.use(Uploader);
Vue.use(PullRefresh);
Vue.use(ImagePreview);
Vue.use(Lazyload);
Vue.use(Swipe);
Vue.use(SwipeItem);
Vue.use(NavBar);
Vue.use(Tab);
Vue.use(Tabs);
Vue.use(Tabbar);
Vue.use(TabbarItem);
Vue.use(Tag);
Vue.use(Switch);
Vue.use(List);
Vue.use(Toast);
Vue.use(Dialog);
Vue.use(Picker);
Vue.use(Overlay);
Vue.use(TreeSelect);
Vue.use(NoticeBar);
Vue.use(Sticky);
Vue.use(Grid);
Vue.use(GridItem);

import { Locale } from "vant";
import zhTW from "vant/lib/locale/lang/zh-TW";
Locale.use("zh-TW", zhTW);

import "./api.js";
import "./utils/filters.js";

import VueClipboard from "vue-clipboard2";
VueClipboard.config.autoSetContainer = true;
Vue.use(VueClipboard);

// import VueTouch from "vue-touch";
// Vue.use(VueTouch, { name: "v-touch" });
// VueTouch.config.swipe = {
//   threshold: 100 //手指左右滑动距离
// };
Vue.config.productionTip = false;

new Vue({
  router,
  render: h => h(App)
}).$mount("#app");
